Repository navigation
fix(security): raster-only cover proxy, sanitised UX Core markup, certificate page crash - #256
Conversation
…tificate page crash - Cover proxy answers only raster image types and sends nosniff plus a sandboxing content policy, so it cannot serve active content from our origin. - UX Core content goes through an allowlist sanitiser after raw HTML parsing. - Certificate page no longer crashes when the visitor context is not loaded; the user name is encoded in the request path. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Claude finished @manager's task in 24s —— View job Review of PR #256
SummaryThe direction is right and the changes are small and focused. Good
Issues (inline)
Minor, not blocking
|
| // Persona text is saved by visitors and shown on public pages, so raw HTML is | ||
| // filtered to the tags our content uses. Custom tags are the ones | ||
| // useContentType renders. | ||
| const SAFE_STYLE = /^(?!.*(position|url\s*\(|expression|@import)).*$/i; |
There was a problem hiding this comment.
Two problems with this denylist regex:
- It can be bypassed with CSS escapes.
p\6fsition:fixedis not matched byposition, but browsers decode it. Reject any value containing a backslash, or better, allowlist properties (color, font-, text-, margin, padding, background-color...) instead of denying keywords. - It over-blocks legitimate properties such as
background-position. It also drops the whole style when the value spans lines, because.does not match newlines.
| const SAFE_STYLE = /^(?!.*(position|url\s*\(|expression|@import)).*$/i; | |
| const SAFE_STYLE = /^(?!.*(\\|position|url\s*\(|expression|@import))[\s\S]*$/i; |
|
|
||
| import type { TRouter } from '@uxcore/local-types/global'; | ||
|
|
||
| import { getCertificate } from '@uxcore/api/uxcat/certificate'; |
There was a problem hiding this comment.
This reorders the imports and removes the group spacing, which is unrelated to the fix and adds diff noise. The same happens in ContentParser.tsx, where useContentType moved above third-party imports. It looks like an editor or tool resort. Please revert to the repo's simple-import-sort order (run eslint --fix) so the diff only carries the real changes.
…ing certificate answers 404 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Claude finished @manager's task in 15s —— View job Review of PR #256 (re-run on synchronize)I read the diff against What looks good
Still open from the earlier inline comments
Worth checking before merge (not blocking)
I made no code changes. |
…be a CMS path Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Claude finished @manager's task in 16s —— View job Review of PR #256 (re-run on synchronize)Static review of Resolved since the earlier passes (commit d5d27a2)
Still open
Worth checking on DEV before the owner go (not blocking)
Looks good
No UX Core data, slug or schema changes in this diff. |
|
On the import order: the reordering comes from the repository pre-commit hook ( |
What changes for visitors
nosniffplus a sandboxing content policy.stylewithout positioning or URLs, and the accordion, download and trello blocks.Checks
tsc --noEmitpasses, ESLint and Prettier clean on the touched files.javascript:link, iframe, form and fixed-position payloads next to legitimate markup.Not merged: waits for the owner go.
🤖 Generated with Claude Code